<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: awtk.TextSelector类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>awtk</b></li><li class="navelem"><a class="el" href="classawtk_1_1_text_selector.html">TextSelector</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="classawtk_1_1_text_selector-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">awtk.TextSelector类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
类 awtk.TextSelector 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classawtk_1_1_text_selector.png" usemap="#awtk.TextSelector_map" alt=""/>
  <map id="awtk.TextSelector_map" name="awtk.TextSelector_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a1f190b32fb5d1f0f916c4821ead44a15"><td class="memItemLeft" align="right" valign="top"><a id="a1f190b32fb5d1f0f916c4821ead44a15"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TextSelector</b> (long nativeObj)</td></tr>
<tr class="separator:a1f190b32fb5d1f0f916c4821ead44a15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d67b05df51fa7c19014310d5fc175fc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#a7d67b05df51fa7c19014310d5fc175fc">resetOptions</a> ()</td></tr>
<tr class="separator:a7d67b05df51fa7c19014310d5fc175fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e8b697a821b17d4740149792871f9c4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#a3e8b697a821b17d4740149792871f9c4">countOptions</a> ()</td></tr>
<tr class="separator:a3e8b697a821b17d4740149792871f9c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37d4365e62a239c4b245720d16275f06"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#a37d4365e62a239c4b245720d16275f06">appendOption</a> (int value, String text)</td></tr>
<tr class="separator:a37d4365e62a239c4b245720d16275f06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8493db8470a992349e902d5532037d1e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#a8493db8470a992349e902d5532037d1e">setOptions</a> (String options)</td></tr>
<tr class="separator:a8493db8470a992349e902d5532037d1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7527100f5090cb1b19f55935176968b2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#a7527100f5090cb1b19f55935176968b2">setRangeOptions</a> (int start, int nr, int step)</td></tr>
<tr class="separator:a7527100f5090cb1b19f55935176968b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56df323d11545dfd4aba032ffe5fd37c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#a56df323d11545dfd4aba032ffe5fd37c">getValue</a> ()</td></tr>
<tr class="separator:a56df323d11545dfd4aba032ffe5fd37c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb3322919ed8b491f0f741fd9f999de5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#aeb3322919ed8b491f0f741fd9f999de5">setValue</a> (int value)</td></tr>
<tr class="separator:aeb3322919ed8b491f0f741fd9f999de5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4a0c4ca3d00dc64bb87f2ef4709e000"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#ad4a0c4ca3d00dc64bb87f2ef4709e000">getTextValue</a> ()</td></tr>
<tr class="separator:ad4a0c4ca3d00dc64bb87f2ef4709e000"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9e2fa7363024e273a6e8c7ad6d9af1d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#ab9e2fa7363024e273a6e8c7ad6d9af1d">setText</a> (String text)</td></tr>
<tr class="separator:ab9e2fa7363024e273a6e8c7ad6d9af1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2da1800f2a175e6b4a725e49d15d4ea0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#a2da1800f2a175e6b4a725e49d15d4ea0">setSelectedIndex</a> (int index)</td></tr>
<tr class="separator:a2da1800f2a175e6b4a725e49d15d4ea0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8a841aefe4378862ec81a822a3ff826"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#af8a841aefe4378862ec81a822a3ff826">setVisibleNr</a> (int visible_nr)</td></tr>
<tr class="separator:af8a841aefe4378862ec81a822a3ff826"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d7a1e862637d3bba579dd569ef4af56"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#a1d7a1e862637d3bba579dd569ef4af56">getVisibleNr</a> ()</td></tr>
<tr class="separator:a1d7a1e862637d3bba579dd569ef4af56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac72d759c33ce8c209e7258728448775d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#ac72d759c33ce8c209e7258728448775d">getSelectedIndex</a> ()</td></tr>
<tr class="separator:ac72d759c33ce8c209e7258728448775d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a567ccfb12883532d705ef78f0bdc21f5"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#a567ccfb12883532d705ef78f0bdc21f5">getOptions</a> ()</td></tr>
<tr class="separator:a567ccfb12883532d705ef78f0bdc21f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a194dd27ae3475592e7dce0901b686049"><td class="memItemLeft" align="right" valign="top"><a id="a194dd27ae3475592e7dce0901b686049"></a>
static <a class="el" href="classawtk_1_1_text_selector.html">TextSelector</a>&#160;</td><td class="memItemRight" valign="bottom"><b>cast</b> (long nativeObj)</td></tr>
<tr class="separator:a194dd27ae3475592e7dce0901b686049"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d74aa85d0be74f525b104b6c63e2b6d"><td class="memItemLeft" align="right" valign="top">static Widget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#a5d74aa85d0be74f525b104b6c63e2b6d">create</a> (Widget parent, int x, int y, int w, int h)</td></tr>
<tr class="separator:a5d74aa85d0be74f525b104b6c63e2b6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30360a436b5cbad2800d19fdbdd31ef8"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_text_selector.html">TextSelector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_text_selector.html#a30360a436b5cbad2800d19fdbdd31ef8">cast</a> (Widget widget)</td></tr>
<tr class="separator:a30360a436b5cbad2800d19fdbdd31ef8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:ae4b5bd08aafeb2e95f29f507895e8320"><td class="memItemLeft" align="right" valign="top"><a id="ae4b5bd08aafeb2e95f29f507895e8320"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><b>nativeObj</b></td></tr>
<tr class="separator:ae4b5bd08aafeb2e95f29f507895e8320"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>文本选择器控件，通常用于选择日期和时间等。</p>
<p>XXX: 目前需要先设置options和visible_nr，再设置其它参数(在XML中也需要按此顺序)。</p>
<p>text_selector_t是widget的子类控件，widget_t的函数均适用于text_selector_t控件。</p>
<p>在xml中使用"text\_selector"标签创建文本选择器控件。如：</p>
<div class="fragment"><div class="line">&lt;<span class="keywordtype">text_selector</span> <span class="keyword">options</span>=<span class="stringliteral">&quot;red;green;blue;gold;orange&quot;</span> <span class="keyword">visible_nr</span>=<span class="stringliteral">&quot;3&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;red&quot;</span>/&gt;</div></div><!-- fragment --><p>更多用法请参考：<a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/ui/text_selector.xml">text_selector.xml</a></p>
<p>在c代码中使用函数text_selector_create创建文本选择器控件。如：</p>
<p>完整示例请参考：<a href="https://github.com/zlgopen/awtk-c-demos/blob/master/demos/text_selector.c">text_selector demo</a></p>
<p>可用通过style来设置控件的显示风格，如字体和背景颜色等。如：</p>
<div class="fragment"><div class="line">&lt;<span class="keywordtype">style</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;dark&quot;</span> <span class="keyword">fg_color</span>=<span class="stringliteral">&quot;#a0a0a0&quot;</span>  <span class="keyword">text_color</span>=<span class="stringliteral">&quot;black&quot;</span> <span class="keyword">text_align_h</span>=<span class="stringliteral">&quot;center&quot;</span>&gt;</div><div class="line">&lt;<span class="keywordtype">normal</span>     <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#ffffff&quot;</span> <span class="keyword">mask_color</span>=<span class="stringliteral">&quot;#404040&quot;</span> <span class="keyword">border_color</span>=<span class="stringliteral">&quot;#404040&quot;</span>/&gt;</div><div class="line">&lt;/<span class="keywordtype">style</span>&gt;</div></div><!-- fragment --><p>更多用法请参考：<a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/styles/default.xml#L443">theme default</a> </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a37d4365e62a239c4b245720d16275f06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a37d4365e62a239c4b245720d16275f06">&#9670;&nbsp;</a></span>appendOption()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.TextSelector.appendOption </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>text</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>追加一个选项。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>值。 </td></tr>
    <tr><td class="paramname">text</td><td>文本。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a30360a436b5cbad2800d19fdbdd31ef8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a30360a436b5cbad2800d19fdbdd31ef8">&#9670;&nbsp;</a></span>cast()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_text_selector.html">TextSelector</a> awtk.TextSelector.cast </td>
          <td>(</td>
          <td class="paramtype">Widget&#160;</td>
          <td class="paramname"><em>widget</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>转换text_selector对象(供脚本语言使用)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">widget</td><td>text_selector对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>text_selector对象。 </dd></dl>

</div>
</div>
<a id="a3e8b697a821b17d4740149792871f9c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e8b697a821b17d4740149792871f9c4">&#9670;&nbsp;</a></span>countOptions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TextSelector.countOptions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取选项个数。</p>
<dl class="section return"><dt>返回</dt><dd>返回选项个数。 </dd></dl>

</div>
</div>
<a id="a5d74aa85d0be74f525b104b6c63e2b6d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d74aa85d0be74f525b104b6c63e2b6d">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static Widget awtk.TextSelector.create </td>
          <td>(</td>
          <td class="paramtype">Widget&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建text_selector对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="a567ccfb12883532d705ef78f0bdc21f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a567ccfb12883532d705ef78f0bdc21f5">&#9670;&nbsp;</a></span>getOptions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String awtk.TextSelector.getOptions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置可选项(冒号分隔值和文本，分号分隔选项，如:1:red;2:green;3:blue)。 对于数值选项，也可以指定一个范围，用『-』分隔起始值、结束值和格式。 如："1-7-%02d"表示1到7，格式为『02d』，格式为可选，缺省为『d』。 </p>

</div>
</div>
<a id="ac72d759c33ce8c209e7258728448775d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac72d759c33ce8c209e7258728448775d">&#9670;&nbsp;</a></span>getSelectedIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TextSelector.getSelectedIndex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>当前选中的选项。 </p>

</div>
</div>
<a id="ad4a0c4ca3d00dc64bb87f2ef4709e000"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4a0c4ca3d00dc64bb87f2ef4709e000">&#9670;&nbsp;</a></span>getTextValue()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String awtk.TextSelector.getTextValue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取text_selector的文本。</p>
<dl class="section return"><dt>返回</dt><dd>返回文本。 </dd></dl>

</div>
</div>
<a id="a56df323d11545dfd4aba032ffe5fd37c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56df323d11545dfd4aba032ffe5fd37c">&#9670;&nbsp;</a></span>getValue()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TextSelector.getValue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取text_selector的值。</p>
<dl class="section return"><dt>返回</dt><dd>返回值。 </dd></dl>

</div>
</div>
<a id="a1d7a1e862637d3bba579dd569ef4af56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d7a1e862637d3bba579dd569ef4af56">&#9670;&nbsp;</a></span>getVisibleNr()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TextSelector.getVisibleNr </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>可见的选项数量(只能是3或者5，缺省为5)。 </p>

</div>
</div>
<a id="a7d67b05df51fa7c19014310d5fc175fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d67b05df51fa7c19014310d5fc175fc">&#9670;&nbsp;</a></span>resetOptions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.TextSelector.resetOptions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>重置所有选项。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a8493db8470a992349e902d5532037d1e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8493db8470a992349e902d5532037d1e">&#9670;&nbsp;</a></span>setOptions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.TextSelector.setOptions </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>options</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置选项。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">options</td><td>选项。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a7527100f5090cb1b19f55935176968b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7527100f5090cb1b19f55935176968b2">&#9670;&nbsp;</a></span>setRangeOptions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.TextSelector.setRangeOptions </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>step</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置一系列的整数选项。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">start</td><td>起始值。 </td></tr>
    <tr><td class="paramname">nr</td><td>个数。 </td></tr>
    <tr><td class="paramname">step</td><td>步长。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a2da1800f2a175e6b4a725e49d15d4ea0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2da1800f2a175e6b4a725e49d15d4ea0">&#9670;&nbsp;</a></span>setSelectedIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.TextSelector.setSelectedIndex </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置第index个选项为当前选中的选项。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>选项的索引。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ab9e2fa7363024e273a6e8c7ad6d9af1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9e2fa7363024e273a6e8c7ad6d9af1d">&#9670;&nbsp;</a></span>setText()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.TextSelector.setText </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>text</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置text_selector的文本。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>文本。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aeb3322919ed8b491f0f741fd9f999de5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb3322919ed8b491f0f741fd9f999de5">&#9670;&nbsp;</a></span>setValue()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.TextSelector.setValue </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置text_selector的值。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="af8a841aefe4378862ec81a822a3ff826"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8a841aefe4378862ec81a822a3ff826">&#9670;&nbsp;</a></span>setVisibleNr()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.TextSelector.setVisibleNr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>visible_nr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置可见的选项数。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">visible_nr</td><td>选项数。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/TextSelector.java</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
